<div class="col-sm-12 outer-client-home shadow">
	<div class="row">
		<div class="col-md-7 bg-putih-client">
			<div class="row">
				<?php
					if(isset($list_client)){
						foreach($list_client as $val){
							if($val['gambar']==""){
								$gambar="default.jpg";
							}else{
								$gambar=$val['gambar'];
							}
							$path_gambar=base_url()."foto_client/".$gambar;
					?>
							<div class="col-sm-3" style="float:left"><center><img src="<?php echo $path_gambar;?>" /></center></div>
					<?php
						}
					}
				?>
				
			</div>
		</div>
		<div class="col-md-5">			
			<div id="grafik" style="height: 260px"></div>
    	<div class="pull-right">
    		<a href="<?php echo site_url('grafik') ?>" class="btn btn-primary btn-sm">View All</a>
			<div class="clearfix"></div>
    	</div>
		</div>
	</div>
</div>

<?php 
	if(isset($list_chart)){
		foreach($list_chart as $val){
			$hasil_tahun[]=$val['tahun'];
			$hasil_softdev[]=$val['jml_softdev'];
			$hasil_internet[]=$val['jml_internet'];
			$hasil_infra[]=$val['jml_infrastruktur'];
		}
	}
	$tahun =  json_encode($hasil_tahun);
	$sofdev =  json_encode($hasil_softdev);
	$internet =  json_encode($hasil_internet);
	$infra =  json_encode($hasil_infra);
?>

<script type="text/javascript">
	$(function () {
    $('#grafik').highcharts({
      chart: {
          type: 'column'
      },
      title: {
          text: 'Grafik Jumlah Pekerjaan'
      },
      subtitle: {
          text: ''
      },
      xAxis: {
          categories: <?php echo $tahun ?>
      },
      yAxis: {
          min: 0,
          title: {
              text: 'Jumlah'
          }
      },
      tooltip: {
          shared: true
      },
      plotOptions: {
          column: {
              pointPadding: 0.2,
              borderWidth: 0
          }
      },
      series: [{
          name: 'Software Development',
          data: <?php echo str_replace('"', '', $sofdev)?>,
          tooltip: {
                  valueSuffix: ' Projek'
                }
      }, {
          name: 'Infrastructure',
          data: <?php echo str_replace('"', '', $infra)?>,
          tooltip: {
                  valueSuffix: ' Projek'
                }
      }, {
          name: 'Internet',
          data: <?php echo str_replace('"', '', $internet)?>,
          tooltip: {
                  valueSuffix: ' Mbps'
                }
      }]
    });
	});
</script>